Determination of leak during cpap treatment

ABSTRACT

A respiratory treatment apparatus and method in which a leak is determined by using an averaging window. The window starts at the present time and extends back in time to a point determined according to a current one of progressively detected phase measures of a first respiratory cycle and a corresponding phase measure attributable to a preceding second respiratory cycle. In another aspect, a jamming index indicates whether the leak is rapidly changing. To the extent that jamming is high, the leak estimate used progressively changes from that using sliding breath-window averaging to a more robust and faster responding low-pass filter method, and adjustment of ventilatory support based on measures employing estimated respiratory flow is slowed down or stopped.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 12/438,758, filed Feb. 25, 2009, which is a national stageapplication of PCT Application No. PCT/AU 2007/001237, filed Aug. 30,2007, which claims the benefit of the filing date of U.S. ProvisionalApplication No. 60/823,934, filed Aug. 30, 2006, the disclosures ofwhich are incorporated herein by reference.

FIELD OF THE INVENTION

This invention relates to treatment of apneas and other respiratorydisorders. In particular it relates to methods and apparatus for thedetermination of leakage airflow and true respiratory airflow, duringthe mechanical application of positive airway pressure.

BACKGROUND OF THE INVENTION

For the treatment of apneas and other respiratory disorders, breathablegas is supplied from a mechanical respirator or ventilator, for examplevia a mask, at a pressure which may be higher during inspiration andlower during expiration. (In this specification any reference to a“mask” is to be understood as including all forms of devices for passingbreathable gas to a person's airway, including nose masks, nose andmouth masks, nasal prongs/pillows and endrotracheal or tracheostomytubes. The term “ventilator” is used to describe any device that doespart of the work of breathing.) Typically one measures the subject'srespiratory airflow during mechanical ventilation to assess adequacy oftreatment, or to control the operation of the ventilator.

Respiratory airflow is commonly measured with a pneumotachograph placedin the gas delivery path between the mask and the pressure source. Leaksbetween the mask and the subject are unavoidable. The pneumotachographmeasures the sum of the respiratory airflow plus the flow through theleak plus flow through the vent (also called “deliberate leak”). If theinstantaneous flow through the leak is known, the respiratory airflowcan be calculated by subtracting the flow through the leak and the flowthrough the vent from the flow at the pneumotach. Typically the flowthrough the vent is a known function of pressure at the vent, and giventhat the pressure at the vent can be estimated with reasonable accuracy,the flow through the vent can then be straightforwardly calculated. Onthe other hand, if the vent characteristics are suitable for the leakmodel employed, the vent flow and non-deliberate leak can be lumpedtogether and estimated as a single quantity. The direct estimation ofvent flow using pressure at the vent will be assumed hereinafter, andsubtraction of this vent flow from total ventilator outflow will beassumed to have occurred when not mentioned explicitly.

Some methods to correct for the flow through the leak assume (i) thatthe leak is substantially constant, and (ii) that over a sufficientlylong time, inspiratory and expiratory respiratory airflow will cancel.If these assumptions are met, the average flow through the pneumotachover a sufficiently long period will equal the magnitude of the leak,and the true respiratory airflow may then be calculated as described.

The known method is only correct if the pressure at the mask isconstant. If, on the other hand, the mask pressure varies with time (forexample, in the case of a ventilator), assumption (i) above will beinvalid, and the calculated respiratory airflow will therefore beincorrect. This is shown markedly in FIGS. 1 a-1 f.

FIG. 1 a shows a trace of measured mask pressure in bi-level CPAP(Continuous Positive Airway Pressure) treatment between about 4 cm H₂Oon expiration and 12 cm H₂O on inspiration. FIG. 1 b shows a trace oftrue respiratory airflow in synchronism with the mask pressures. Attime=21 seconds a mask leak occurs, resulting in a leakage flow from theleak that is a function of the treatment pressure, as shown in FIG. 1 c.The measured mask flow shown in FIG. 1 d now includes an offset due tothe leak flow. The prior art method then determines the calculated leakflow over a number of breaths, as shown in FIG. 1 e. The resultingcalculated respiratory flow, as the measured flow minus the calculatingleak flow is shown in FIG. 1 f, having returned to the correct meanvalue, however is incorrectly scaled in magnitude, giving a falseindication of peak positive and negative airflow.

Another prior art arrangement is disclosed in European Publication No. 0714 670 A2, including a calculation of a pressure-dependent leakcomponent. The methodology relies on knowing precisely the occurrence ofthe start of an inspiratory event and the start of the next inspiratoryevent. In other words, the leak calculation is formed as an average overa known breath and applied to a subsequent breath.

This method cannot be used if the moment of start and end of theprevious breath are unknown. In general, it can be difficult toaccurately calculate the time of start of a breath. This is particularlythe case immediately following a sudden change in the leak.

Furthermore, the method will not work in the case of a subject who ismaking no respiratory efforts, and is momentarily not being ventilatedat all, for example during an apnea, because for the duration of theapnea there is no start or end of breath over which to make acalculation.

In U.S. Pat. No. 6,162,129 (Berthon-Jones) the leak is determined byfirst estimating the conductance of the leak path from the long termorifice flow:

${\frac{1}{R_{L}} = \frac{< Q >}{< \sqrt{p} >}},$

where G_(L)=1/R_(L) is conductance (L denotes leak), Q is instantaneousflow, p is instantaneous pressure and < > denotes a long term averagecalculated for example by low pass filtering with an IIF or other filterhaving a long time constant. Note that the word “average” as used hereincontains the general sense inclusive of the result of a low passfiltering step, and is not limited to an arithmetic mean or otherstandard average such as the RMS average.

The instantaneous leak flow, based on the model of the flow through anorifice is then

$Q_{L} = {\frac{1}{R_{L}}\left. \sqrt{}p \right.}$

Note that the instantaneous respiratory airflow is then Q_(R)=Q−Q_(L).

Berthon-Jones attempts to deal with sudden changes in instantaneous leakflow by dynamically adjusting the filter's time constant using fuzzylogic, lengthening the time constant if it is certain that the leak issteady, reducing the time constant if it is certain that the leak hassuddenly changed, and using intermediately longer or shorter timeconstants if it is intermediately certain that the leak is steady.

Berthon-Jones also develops a jamming index by fuzzy logic to deal withthe case of a large and sudden increase in the conductance of the leak,in which case the calculated respiratory airflow will be incorrect. Inparticular during apparent inspiration, the calculated respiratoryairflow will be large positive for a time that is large compared withthe expected duration of a normal inspiration. Conversely, if there is asudden decrease in conductance of the leak, then during apparentexpiration the calculated respiratory airflow will be large negative fora time that is large compared with the duration of normal expiration.

Therefore, the jamming index, i.e. an index of the degree of certaintythat the leak has suddenly changed, is derived, such that the longer theairflow has been away from zero, and by a larger amount, the larger theindex. The explicit calculation of the jamming index by fuzzy logic isdescribed in the '129 patent, which is incorporated herein by reference.

The time constant for the low pass filters is then adjusted to varyinversely with the jamming index. In operation, if there is a sudden andlarge change in the leak, the index will be large, and the time constantfor the calculation of the conductance of the leak will be small,allowing rapid convergence on the new value of the leakage conductance.Conversely, if the leak is steady for a long time, the index will besmall, and the time constant for calculation of the leakage conductancewill be large; enabling accurate calculation of the instantaneousrespiratory airflow. In the spectrum of intermediate situations, wherethe calculated instantaneous respiratory airflow is larger and forlonger periods, the index will be progressively larger, and the timeconstant for the calculation of the leak will progressively reduce. Forexample, at a moment in time where it is uncertain whether the leak isin fact constant, and the subject merely commenced a large sigh, orwhether in fact there has been a sudden increase in the leak, the indexwill be of an intermediate value, and the time constant for calculationof the impedance of the leak will also be of an intermediate value.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 a shows a trace of measured marked pressure in bi-level CPAPtreatment.

FIG. 1 b shows a trace of true respiratory airflow in synchronism withmark pressures.

FIG. 1 c shows a trace of leakage flow that is a function of treatmentpressure.

FIG. 1 d shows a trace that illustrates an offset due to leak flow.

FIG. 1 e shows calculated leak flows over a number of breaths.

FIG. 1 f shows calculated respiratory flow.

BRIEF DESCRIPTION OF THE INVENTION

This invention rapidly determines the instantaneous leak in a CPAPsystem without detailed modeling the source of the leak and withouthaving to determine the precise phase in a breathing cycle at which theleak occurs. It relies instead on the use of timers to define thebreathing cycle and a calculation to assure that the instantaneous flowis compared to the flow over a time period long enough to include anentire breath. It does this by looking backward to include an entirephase cycle. This avoids having to take long term averages over multiplebreaths, or to have a model that recognized the beginning and end of abreath.

Sudden changes in a leak are recognized and the degree to which leak israpidly changing is expressed as a jamming index value, which is thenused as a parameter to adjust the contributions of the components ofwhich the leak estimate is made up, and, in the case of aservoventilator, to temporarily slow down or suspend the adjustment ofthe servoventilator controller output parameter, typically pressuresupport level.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The present invention is motivated by the desire to produce acontinuously updated estimate of the leak model parameter which is verystable when the actual leak parameter is stable, but which degradesprogressively and gracefully to a less stable, less accurate butfaster-responding estimate when the actual leak parameter is changingrapidly. The leak model parameter in question is typically an orificeconstant (equivalently a leak conductance), but need not be.

A continuously updated estimate of leak conductance (in particular,continuously updated during each breath) may be calculated by performingsome kind of low-pass filtering operation, such as a 1st-order low passfilter or a moving average filter, typically with a fixed window length,on the non-vent flow (equal to the sum of the respiratory flow and theinstantaneous leak flow) and on the square root of the mask pressure,producing a leak conductance estimate G₁, as in Berthon-Jones. Thismethod has the advantage over some other methods that it is independentof the determination of breath phase (the position within the currentbreath). Thus sudden changes in leak can occur which cause respiratoryflow estimates and hence breath phase estimates to be grossly in error,yet updating of the leak parameter estimates continues. A disadvantageof such breath-independent estimates is that the estimates are notstable within a breath unless particular fortuitous events occur; forexample, by coincidence, the duration of a window averaging filterincludes exactly N breaths, where N is an integer. A particular case ofthis instability is illustrated by considering the situation when 1storder low-pass-filter estimates of mask flow and mask pressure are used.For simplicity, assume that a mask pressure is constant, and that trueleak conductance is zero. Then the leak flow estimate is just a1st-order low-pass-filtered version of respiratory flow. This estimaterises whenever respiratory flow is above the leak flow estimate, andfalls when respiratory flow is below the leak flow estimate. Inparticular, with reasonable filter time constants, the leak flowestimate rises during most of inspiration and falls during most ofinspiration, rising slowly during the expiratory pause, and under normalcircumstances crucially being below zero during the expiratory pause.Since true respiratory flow is zero during the expiratory pause,estimated respiratory flow, being the difference between mask flow (byassumption equal to respiratory flow) and estimated leak flow, ispositive during the expiratory pause, say equal to Q_(eps). If aventilator is designed to trigger into inspiration when the estimatedrespiratory flow exceeds some true respiratory flow threshold Q_(insp)_(—) _(thresh), a ventilator which uses this kind of leak estimate, inorder to trigger at the desired true respiratory flow, must set itstrigger threshold to a higher value Q_(insp) _(—) _(thresh)+Q_(esp).Unfortunately Q_(eps) is a function of the respiratory flow shape, therespiratory rate, and the low-pass-filter time constant, very difficultif not impossible to determine in real time. Hence triggering actuallyoccurs at a variable threshold, and in the worst case auto-triggering(triggering at a true respiratory flow of zero) may occur. It should benoted that the effect of the non-constant estimate of leak parameter inproducing a distorted respiratory flow exists throughout the breath andwhether there is an identifiable expiratory pause or not, with potentialadverse effects on cycling (expiratory triggering) as well an on(inspiratory) triggering, as well as other algorithms which operate onestimated respiratory flow.

“Jamming”, as described by Berthon-Jones, is the extent to which theleak has not yet been compensated for, and usually results from a rapidchange in the leak. It is herein considered to be a fuzzy logicalquantity.

A leak conductance estimate G₁ is calculated as described above. Notethat the time constant of the filters uses preferably decreases asjamming increases, as described in Berthon-Jones.

A second leak conductance estimate G₂ is calculated continuously, at thealgorithmic sampling frequency or a lower frequency (e.g. 10 Hz) whichis still high compared with the respiratory frequency. In a mannerdescribed below, the algorithm identifies the position in the currentbreath, then attempts to find time associated with the same position inthe preceding breath. If it fails to find such a position, it usesinstead a time 10 seconds in the past. Between that time in the past andthe present, a window is established. Low-pass filtered mask flow andlow-pass filtered square root of mask pressure (filtered by anon-breath-dependent method, such as a 1st-order LPF), typically thelow-pass filtered values used for the determination of G₁, are thenfurther low-pass filtered by being averaged over this window. The ratioof these window-averaged values is the leak conductance estimate G₂,which under conditions of stable leak is extremely stable.

Because G₂ responds rather slowly to changes in leak conductance, it isinappropriate to use when the leak is changing rapidly. Thus to theextent that there is jamming, G₁ rather than G₂ is used. In thepreferred implementation, if J is jamming (a quantity in [0,1]), theconductance estimate G_(j) is used, given by

G _(j) =JG ₁+(1−J)G ₂

Instantaneous leak is then straightforwardly calculated byQ_(leak)=G_(j)√{square root over (P_(mask))}.

Determining the Position of the Start of the Averaging Window for G₂

The aim is to determine the same position in the previous breath as thepatient, is at in the current breath. For this one needs a concept ofbreath phase which is not just one of a small set of categories, such asinspiration and expiration, but a conceptually real-valued (in practicerational) variable which increases progressively from the start ofinspiration to the end of expiration, potentially with a small finitenumber of jumps. Such a concept is provided in Berthon-JonesCheyne-Stokes patent, WO98/012965, which is incorporated herein byreference. Breath phase is there defined to be 0 at the start ofinspiration, 0.5 at the start of expiration, and approaches 1 at the endof expiration. Given such a breath phase, one find the breath phase atthe current moment, then searches backward in time to find the samebreath phase in the previous breath. Because breath phase as estimatedby the system described by Berthon-Jones is not necessarily increasingwith time during a breath (neglecting the expiratory to inspiratorytransition, at which it must decrease) though typically it is increasingwith time during a breath, it is necessary to have an algorithm whichsearches backward in time in such a way that a point in the same breathwith the same breath phase as the current value is not identified asbeing in the previous breath. Such a search algorithm is describedbelow; this algorithm may fail under exceptional circumstances, but isquite robust most of the time. Because of jumps in phase, there mayexist no point in the previous breath with a phase equal to the phaseassociated with the current moment, the latest time in the previousbreath with a phase less than or equal to the phase at the currentmoment is used instead.

On the other hand, a system which uses conventional flow thresholds fortriggering and cycling need not use a fuzzy logical system fordetermining breath phase for the purpose of finding the same position inthe previous breath as in the current breath. Assuming that duringinspiration, the maximum time between the present until the end ofinspiration is known (typically determined at the start of inspiration,but not necessarily), the breath phase at each sampling interval isincreased by such an amount that with equal increments of that amount,the phase would reach 0.5 at the end of inspiration. For example, in thesimple case where a maximum inspiratory time of 1.6 seconds wasdetermined at the start of inspiration, the phase would increase at asteady rate of 0.5/1.6 phase units/second. If cycling (transition toexpiration) occurred earlier, for example because respiratory flow fellbelow a cycling threshold, the phase would at that point jump to 0.5.Similar considerations apply during expiration, with rate of increase ofphase being the difference between 1 and the current phase divided bythe time remaining until the maximum expiratory time. If since breathphase determined in this way is typically used only for the purpose ofdetermining the same position in the previous breath as in the currentbreath, it is called “book-keeping” phase.

Regardless of the phase determination method used, whether that ofBerthon-Jones, “book-keeping” phase as described above, or some othermethod, the search backward in time to find the latest time in thepreceding breath with a phase less than or equal to the phase at thecurrent moment is performed as follows (though it will be appreciatedthat for “book-keeping” phase, simpler methods are available).

Starting with the current phase, say φ₀, the invention looks backwardsin time for the most recent phase in the interval [φ₀−0.75, φ₀−0.25].The aim is to seek a point in time at least 0.25 of a breath before thepresent. When such a phase is found, the invention calculatesφ_(l)=φ₀−0.25 and looks backward for a phase in the interval [φ₁−0.75,φ₁−0.25]. This is continued, 0.25 at a time, i.e. φ_(i+1)=φ₁−0.25. Whena phase is found which is in [φ₃−0.075, φ₃−0.25] the iteration ceases,since this is just [φ₀−0.5, φ₀]. If phase varied continuously this wouldhave found exactly φ₀; in reality it will most likely find φ₀−ε., wherehopefully ε is small. By proceeding in this manner we have someconfidence that the phase has gone backward rather than forward, sincewe have found phases in the 4 phase quadrants before the present. Thisalgorithm will regard two phase transitions of 0.5 in succession asbeing movement backward, though the actual direction is of courseactually indeterminate. If this algorithm fails to find a point betweenthe present moment and a time before the present which meets thiscriterion, we take the start of the averaging window to be somereasonable maximum time before the present, such as 10 seconds. As animplementation detail, to reduce computational requirements, the leak,flow values may be averaged over the last 0.1 seconds and stored in abuffer accompanied by the associated breath phase, so that the searchfor the last breath is performed in a buffer of 100 points, and doneevery 0.1 seconds. The averaged leak estimate at the instantaneous leakcalculation frequency, e.g. 100 Hz, can then be calculated by linearinterpolation between the most recent averaged leak conductance estimateand the averaged conductance leak estimate just before it.

In a servoventilator or other system using some kind of measure ofventilation (such as half the absolute value of respiratory flow, or agross alveolar ventilation, or peak flow, or some weighted average offlows determined during inspiration or expiration) to adjust ventilatorysupport, when jamming is observed, the system slams down or suspendschanges in pressure support. This is because respiratory flow estimatesare not reliable in the presence of jamming, and various measures ofventilation based on respiratory flow are likely to overestimateventilation, leading for example in a servoventilator to unwarrantedwithdrawal in ventilatory support because ventilation appears to beabove target ventilation. The extent of slowing down of adjustment ofrespiratory support is preferably some increasing function of thejamming. For example, if the calculated change in respiratory supportfrom that at the previous time that it was calculated is some value ΔS,then the adjusted change in support would be kΔS, where for example k is1 for J≦0.1, 0 for J≧0.3, and taking linearly interpolated values forintermediate values of J.

1. A respiratory treatment apparatus comprising: a flow generator toprovide a flow of breathable gas to a patient respiratory interface; oneor more sensors for measuring gas characteristics associated with thepatient respiratory interface; and a controller coupled with the one ormore sensors and the flow generator, the controller configured tocontrol: a determination of an averaging window, the averaging windowstarting at the present moment and extending back in time to a pointdetermined according to a current one of progressively detected phasemeasures of a first respiratory cycle and a corresponding phase measureattributable to an immediately preceding second respiratory cycle; adetermination of an average measure of flow and an average measure of afunction of pressure, according to the averaging window; and adetermination of an estimate of a leak model parameter, based on thedetermined average measures of the flow and of the function of pressure.2. The apparatus of claim 1, wherein the average measure of flow and theaverage measure of a function of pressure are determined by applying theaveraging window to already averaged measures of flow and a function ofpressure.
 3. The apparatus of claim 1, wherein the determination of theaveraging window comprises an iterative search back through phasemeasures attributable to the first or the second respiratory cycle. 4.The apparatus of claim 3 wherein the iterative search detects thecorresponding phase measure from the immediately preceding respiratorycycle when a latest one of the discrete phase measures has a value lessthan or equal to the value of the current phase measure.
 5. Theapparatus of claim 3 or claim 4, wherein the iterative search comprisesone or more search phase intervals, starting from the current phasemeasure, each search phase interval being smaller than a completebreath.
 6. The apparatus of claim 5 wherein the iterative searchinvolves a plurality of sub-searches, each sub-search being based on acorresponding search phase interval, in each of which a phase is soughtwhich is less than the phase resulting from the previous sub-search byan amount at least equal to the size of the current search phaseinterval.
 7. The apparatus of claim 4, wherein each discrete phasemeasure comprises a value in an interval of 0 through 1; a start ofinspiration being represented by 0, a start of expiration and an end ofinspiration being represented by 0.5, and values representing expirationapproaching
 1. 8. The apparatus of claim 1 wherein the controller isfurther configured to determine the averaging window according to a timethreshold period, if a corresponding phase measure is not detected inthe iterative search during the time threshold period.
 9. The apparatusof claim 1 wherein the estimated leak model parameter comprises leakconductance.
 10. The apparatus of claim 9, wherein the determination ofan estimate of the leak conductance comprises a division of the averagemeasure of flow by an average of the square root of the measure ofpressure.
 11. A method comprising: providing a flow of breathable gas toa patient respiratory interface; measuring gas characteristicsassociated with the patient respiratory interface; determining anaveraging window, the averaging window starting at the present momentand extending back in time to a point determined according to a currentone of progressively detected phase measures of a first respiratorycycle and a corresponding phase measure attributable to an immediatelypreceding second respiratory cycle; determining an average measure offlow and an average measure of a function of pressure, according to theaveraging window; and determining an estimate of a leak model parameter,based on the determined average measures of the flow and of the functionof pressure.
 12. The method of claim 11 wherein determining the averagemeasure of flow and the average measure of a function of pressurecomprises applying the averaging window to already averaged measures offlow and a function of pressure.
 13. The method of claim 11, whereindetermining the averaging window comprises an iterative search backthrough phase measures attributable to the first or the secondrespiratory cycle.
 14. The method of claim 13 wherein the iterativesearch detects the corresponding phase measure from the immediatelypreceding respiratory cycle when a latest one of the discrete phasemeasures has a value less than or equal to the value of the currentphase measure.
 15. The method of claim 13 or claim 14 wherein theiterative search comprises one or more search phase intervals, startingfrom the current phase measure, each search phase interval being smallerthan a complete breath.
 16. The method of claim 15 wherein the iterativesearch involves a plurality of sub-searches, each sub-search being basedon a corresponding search phase interval, in each of which a phase issought which is less than the phase resulting from the previoussub-search by an amount at least equal to the size of the current searchphase interval.
 17. The method of claim 15 further comprisingdetermining the averaging window according to a time threshold period,if a corresponding phase measure is not detected in the iterative searchduring the time threshold period.
 18. The method of claim 14, whereineach discrete phase measure comprises a value in an interval of 0through 1; a start of inspiration being represented by 0, a start ofexpiration and an end of inspiration being represented by 0.5, andvalues representing expiration approaching
 1. 19. The method claim 1wherein the estimated leak model parameter comprises leak conductance.20. The method of claim 19, wherein determining an estimate of the leakconductance comprises a division of the average measure of flow by anaverage of the square root of the measure of pressure.